# vrp_model.py
from dataclasses import dataclass
from typing import List
import numpy as np

@dataclass
class Customer:
    id: int
    x: float
    y: float
    demand: float
    volume: float
    early: int
    late: int

@dataclass
class Vehicle:
    capacity: float
    volume: float
    max_range: float

class VRPTWInstance:
    def __init__(self, customers: List[Customer], depot: Customer,
                 distance_matrix: np.ndarray, time_matrix: np.ndarray,
                 vehicle: Vehicle):
        self.customers = customers
        self.depot = depot
        self.distance_matrix = distance_matrix
        self.time_matrix = time_matrix
        self.vehicle = vehicle
        self.charge_time = 300
        self.transport_cost = 0.5
        self.fixed_cost = 200
        self.charge_cost_rate = 0.2
        self.opportunity_cost_rate = 0.1
        self.early_penalty = 2
        self.late_penalty = 5